﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Enter.Common
{
    internal sealed class SafeCheck
    {
        public static bool IsJPGstr(string Files)
        {
            try
            {
                string str = FileHelper.GetExtension(Files).ToLower();
                string str2 = ".jpg|.gif|.jpeg|.png|.bmp";
                foreach (string str3 in str2.ToString().Split(new char[] { '|' }))
                {
                    if (str == str3)
                    {
                        return true;
                    }
                }
                return false;
            }
            catch
            {
                return false;
            }
        }

        public static bool IsMap(string Files)
        {
            Files = Files.Replace("//", ":");
            return (Files.IndexOf(':') > 0);
        }

        public static bool IsSwfstr(string Files)
        {
            try
            {
                string str = FileHelper.GetExtension(Files).ToLower();
                string str2 = ".swf|.fla";
                foreach (string str3 in str2.ToString().Split(new char[] { '|' }))
                {
                    if (str == str3)
                    {
                        return true;
                    }
                }
                return false;
            }
            catch
            {
                return false;
            }
        }
    }
}
